package com.xuecheng.content.api;

import com.xuecheng.content.model.dto.CoursePreviewDto;
import com.xuecheng.content.model.dto.UploadMediaDto;
import com.xuecheng.content.service.CoursePublishService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(value = "课程计划视频播放接口",tags = "课程计划视频播放接口")
@RequestMapping("/open")
public class CourseOpenController {

    @Autowired
    private CoursePublishService coursePublishService;


    @GetMapping("/course/whole/{courseId}")
    @ApiOperation("查询课程计划树绑定的视频")
    public CoursePreviewDto uploadmedia(@PathVariable Long courseId){
        return coursePublishService.getCoursePreviewInfo(courseId);
    }
}
